package com.atguigu.eduorder.client;

import com.atguigu.commonutils.ordervo.CourseWebVoOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * Created by Miracle yaochengwei on 2020/9/14 10:38
 * 微服务调用，指定调用服务的名称
 */
@Component
@FeignClient("service-edu")//edu肯定调用service-edu模块
public interface EduClient {
    //写调用接口的地址
    //根据课程id 查询课程信息
    //返回对象，是（order和edu）在common统一调用对象  CourseWebVoOrder
    @PostMapping("/eduservice/coursefront/getCourseInfoOrder/{id}")
    public CourseWebVoOrder getCourseInfoOrder(@PathVariable("id") String id);

}
